#APP_VERSION                 := 0.1.0
#export APP_VERSION

CROSS_HOME                  := /opt/linux-devkit/bin/
CROSS                       := $(CROSS_HOME)/arm-arago-linux-gnueabi-
#CROSS_LIB_HOME             := $(CROSS_HOME)/arm-linux-gnueabihf/libc/lib/arm-linux-gnueabihf/
CC                          := $(CROSS)gcc
CPP                         := $(CROSS)g++
AR                          := $(CROSS)ar
LD                          := $(CROSS)ld
STRIP                       := $(CROSS)strip
RANLIB                      := $(CROSS)ranlib
export CROSS CROSS_HOME CC AR LD STRIP RANLIB

CP                          := cp -f
SCP                         := sudo $(CP)
LN                          := ln -svf
SLN                         := sudo $(LN)
RM                          := rm -rf
SRM                         := sudo $(RM)
MV                          := mv -f
SMV                         := sudo $(MV)
MKDIR                       := mkdir -vp
SMKDIR                      := sudo $(MKDIR)
MAKE                        := make
HOSTCC                      := gcc
HOSTLD                      := ld
TOUCH                       := touch -c
CTOUCH                      := touch
CHMOD                       := chmod
SCHMOD                      := sudo $(CHMOD)
CHOWN                       := chown
SCHOWN                      := sudo $(CHOWN)
TAR                         := tar
FIND                        := find
INSTALL                     := install
TEST                        := test
MKNOD                       := mknod
SMKNOD                      := sudo $(MKNOD)
export CP SCP LN SLN RM SRM MV SMV MKDIR SMKDIR MAKE HOSTCC HOSTLD TOUCH CTOUCH CHMOD SCHMOD CHOWN SCHOWN TAR FIND INSTALL TEST MKNOD SMKNOD

#################################################################################
# before use TOP_DIR, must define it first                                      #
#################################################################################
PRJ_HOME                    := $(TOP_DIR)/
INSTALL_HOME                := $(TOP_DIR)/install/
export PRJ_HOME INSTALL_HOME

RELEASE_LOG_FILE            := $(ROOTFS_HOME)/Release
export RELEASE_LOG_FILE            

COMPILE_DATE                := $(shell date "+%F %T")
export COMPILE_DATE

# for the verbose/quite Make Message
V                           ?= 99
ifeq ($(V), 99)
    ECHO :=
else
    ECHO := @
endif
E                           := $(ECHO)echo

